import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

import java.rmi.RMISecurityManager;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.Naming;


public class RmiClient
{
    public static void main(String[] args)
    {

	System.setSecurityManager(null);
        //if (System.getSecurityManager() == null)
        //    System.setSecurityManager(new RMISecurityManager());
        try
        {
            RmiService remoteService = (RmiService) Naming.lookup("//127.0.0.1:9999/RmiService");
            remoteService.print("Hello World!!!");
        }
	catch (Exception ex)
        {
            ex.printStackTrace();
        }
    }
}

